package entity;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Component;

/**
 * 用户的留言信息实体类
 * @author Administrator
 *
 */
@Component
public class Comment {

	private int id;  //编号
	private Video video;  //此评论所在的视频
	private Users user;   //此评论的归属者
	private String detail;  //评论内容
	private Date commTime;  //评论时间
	private int commClick;  //此评论点赞数
	private List<Reply> replys;  //回复的信息集合
	private String formatTime;
	
	public String getFormatTime() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		formatTime = sdf.format(this.commTime);
		return formatTime;
	}
	public void setFormatTime(String formatTime) {
		this.formatTime = formatTime;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Video getVideo() {
		return video;
	}
	public void setVideo(Video video) {
		this.video = video;
	}
	public Users getUser() {
		return user;
	}
	public void setUser(Users user) {
		this.user = user;
	}
	public String getDetail() {
		return detail;
	}
	public void setDetail(String detail) {
		this.detail = detail;
	}
	public Date getCommTime() {
		return commTime;
	}
	public void setCommTime(Date commTime) {
		this.commTime = commTime;
	}
	public int getCommClick() {
		return commClick;
	}
	public void setCommClick(int commClick) {
		this.commClick = commClick;
	}
	public List<Reply> getReplys() {
		return replys;
	}
	public void setReplys(List<Reply> replys) {
		this.replys = replys;
	}
	
}
